import { configureStore } from '@reduxjs/toolkit';
import authReducer from './slices/authSlice';
import portfolioReducer from './slices/portfolioSlice';
import productReducer from './slices/productSlice';
import dataReducer from './slices/dataSlice';
import uiReducer from './slices/uiSlice';


export const store = configureStore({
  reducer: {
    auth: authReducer,
    portfolio: portfolioReducer,
    product: productReducer,
    data: dataReducer,
    ui: uiReducer,

  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: {
        ignoredActions: ['persist/PERSIST'],
      },
    }),
});

export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;